/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 * 
 * @author yaoyuming
 * 
 * @date 2020-07-23 14:31
 */
package com.yao.wechat.mapper.sql;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yao.wechat.entity.dto.PublicDto;

/**
 * 微信公众号sql组装
 * 
 * @author yaoyuming
 * @date 2020/07/23 14:31
 */
public class PublicWrapper {

    public static Wrapper<PublicDto> byOriginId(String originId) {
        LambdaQueryWrapper<PublicDto> query = Wrappers.lambdaQuery();
        query.eq(PublicDto::getOriginId, originId);
        return query;
    }

    public static Wrapper<PublicDto> byAppId(String appId, String appSecret) {
        LambdaQueryWrapper<PublicDto> query = Wrappers.lambdaQuery();
        query.eq(PublicDto::getAppId, appId).eq(PublicDto::getAppSecret, appSecret);
        return query;
    }

}